package com.zhigh.urule.quickstart.urule.event;

import com.bstek.urule.model.flow.FlowNode;
import com.bstek.urule.model.flow.NodeEvent;
import com.bstek.urule.model.flow.ins.FlowContext;
import com.bstek.urule.model.flow.ins.ProcessInstance;
import org.springframework.stereotype.Component;

@Component("urule.log-event")
public class LogEvent implements NodeEvent {
    @Override
    public void enter(FlowNode flowNode, ProcessInstance processInstance, FlowContext flowContext) {
        System.out.printf("enter %s", flowNode.getName());
    }

    @Override
    public void leave(FlowNode flowNode, ProcessInstance processInstance, FlowContext flowContext) {
        System.out.printf("leave %s", flowNode.getName());
    }
}
